<?php

namespace app\api\validation;

class ShoppingCart extends \think\Validate
{
    protected $rule = [
        'goods_id' => 'require',
        'count' => 'require|min:1',
    ];

    protected $message = [
        'goods_id.require' => '商品ID不能为空',
        'count.require' => '数量不能为空',
        'count.numeric' => '数量不是一个有效的数值',
    ];
}